# -.- coding:utf-8 -.-# __author__ = 'zhengtong'class Calc:    def __init__(self, a, b):        self.a = a        self.b = b    def set(self, a, b):        self.a = a        self.b = b    def add(self):        return self.a + self.b    def sub(self):        return self.a - self.b    def mul(self):        return self.a * self.b    def div(self):        if b != 0:            return round(self.a / self.b, 4)        raise "分母不可以为零"    def run(calc):        sum = calc.add()        sub = calc.sub()        mul = calc.mul()        div = calc.div()        print(sum, sub, mul, div)if __name__ == '__main__':    a = int(input("请输入第一个数据:"))    b = int(input("请输入第二个数据:"))#测试各函数    calc = Calc(a, b)    calc.run()#手动重置    calc.set(8, 9)    calc.run()